<?php
	include('function.php');
	$conn = conn();
	//生成时间戳
	$time = time();
	//拼凑sql语句。
	$sql = "insert into article values (null,'{$_POST['cata_id']}','{$_POST['title']}','{$_POST['desc']}','{$_POST['content']}',$time,'{$_POST['img']}',0)";
	//执行sql语句
	mysqli_query($conn,$sql);
	//跳转回主页
	header("Location:list.php");
?>